package com.smartwebx.fr.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.smartwebx.fr.bean.mysql.PagePoint;
import com.smartwebx.fr.service.ckeditor.SmartPointService;

@Controller
@RequestMapping("/point")
public class SmartPointController {
	@Autowired
	private SmartPointService smartPointService;

	@RequestMapping(value = "/save")
	@ResponseBody
	public void savePoint(PagePoint point) {
		smartPointService.insertOrUpdate(point);
	}

	@RequestMapping(value = "/getPointConfigById", produces = "text/html;charset=UTF-8")
	@ResponseBody
	public String getPointConfigById(String id) {
		return smartPointService.getPageConfigById(id);
	}
}
